package cn.pn.project.client.schedule;

import cn.pn.project.client.schedule.follback.PlaceFallBack;
import cn.pn.project.pojo.schedule.Place;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.SQLException;

@FeignClient(name="pn-scheduler-provider",fallback = PlaceFallBack.class)
public interface PlaceFeign {

    /**
     * 根据场地id查询场地信息
     * @param placeId
     * @return
     * @throws SQLException
     */
    @RequestMapping(value = "/getPlaceByPlaceId")
    public Place getPlaceByPlaceId(@RequestParam("placeId")Integer placeId) throws SQLException;
}
